<extend name="common/base" />
<block name="body">
	<div class="tab-wrap">
		<ul class="nav nav-tabs">
		<volist name="Think.config.CONFIG_GROUP_LIST" id="group">
			<li <eq name="id" value="$key">class="active"</eq>><a href="{:url('?id='.$key)}" data-toggle="ajaxload" data-target="currenttab">{$group}配置</a></li>
		</volist>
		</ul>
		<div class="tab-content">
	        <form action="{:url('save')}" method="post" class="form-horizontal" data-toggle="ajaxform">
	            <volist name="list" id="config">
		        <div class="form-item">
			        <label class="item-label">{$config.title}<span class="check-tips">（{$config.remark}）</span> </label>
			        <div class="controls">
			        <switch name="config.type">
			        <case value="0">
			        <input type="text" class="text input-small" name="config[{$config.name}]" value="{$config.value}">
			        </case>
			        <case value="1">
			        <input type="text" class="text input-large" name="config[{$config.name}]" value="{$config.value}">
			        </case>
			        <case value="2">
			        <label class="textarea input-large">
				        <textarea name="config[{$config.name}]">{$config.value}</textarea>
			        </label>
			        </case>
			        <case value="3">
			        <label class="textarea input-large">
				        <textarea name="config[{$config.name}]">{$config.value}</textarea>
			        </label>
			        </case>
			        <case value="4">
			        <select name="config[{$config.name}]">
				        <volist name=":parse_config_attr($config['extra'])" id="vo">
					        <option value="{$key}" <eq name="config.value" value="$key">selected</eq>>{$vo}</option>
				        </volist>
			        </select>
			        </case>
			        </switch>

			        </div>
		        </div>
		        </volist>
		        <div class="form-item">
			        <label class="item-label"></label>
			        <div class="controls">
				        <empty name="list"><button type="submit" disabled class="btn btn-success disabled" target-form="form-horizontal">确 定</button><else/><button type="submit" class="btn btn-success ajax-post" target-form="form-horizontal">确 定</button></empty>

				        <button class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返 回</button>
			        </div>
		        </div>
	        </form>
		</div>
	</div>
</block>
